﻿@using Gx.Common;
@using Gx.Model.Role;
@using Gx.Model.Enums;
@{
    Layout = null;
    string CompanyName = ConfigHelper.GetWebConfig("CompanyName");
}
<!DOCTYPE html>
<html>
<head>
    <meta name="viewport" content="width=device-width" />
    <title>@CompanyName</title>
    <link href="/Content/css/default.css" rel="stylesheet" />
    <link href="/Content/js/jquery-easyui-1.4/themes/default/easyui.css" rel="stylesheet"
          type="text/css" />
    <script src="/Content/js/jquery-easyui-1.4/jquery.min.js" type="text/javascript"></script>
    <script src="/Content/js/jquery-easyui-1.4/easyloader.js" type="text/javascript"></script>
    <script src="/Content/js/jquery-easyui-1.4/locale/easyui-lang-zh_CN.js" type="text/javascript"></script>
    <script src="~/Content/js/js.cookie.min.js"></script>
    @Scripts.Render("~/Index/js")
    <script language="javascript" type="text/javascript">
          var _menus =@Html.Raw(ViewData["menusList"].ToString())
    </script>
    <script type="text/javascript">
        //禁用页面后退按钮
        $(document).ready(function (e) {
            var counter = 0;
            if (window.history && window.history.pushState) {
                $(window).on('popstate', function () {
                    window.history.pushState('forward', null, '#');

                    window.history.forward(1);
                });
            }
            window.history.pushState('forward', null, '#'); //在IE中必须得有这两行
            window.history.forward(1);
        });

        ////屏蔽鼠标右键
        //function stop() {
        //    return false;
        //}
        //document.oncontextmenu = stop;

        $(function () {
            $('#editPassWord').click(function () {
                $('#dlg').dialog('open');
            });
        });
        function saveData() {
            var newPwd = $("#newPwd").val();
            var newPwd1 = $("#newPwd1").val();
            if (newPwd == "") {
                $.messager.show({
                    title: '消息提示',
                    msg: '密码不能为空'
                });
                return;
            }
            if (newPwd != newPwd1) {
                $.messager.show({
                    title: '消息提示',
                    msg: '两次密码不一致'
                });
                return;
            }
            $.post("/Home/EditPassWord", { userPass: newPwd }, function (json) {
                $.messager.show({
                    title: '消息提示',
                    msg: json.Msg
                });
                $('#dlg').dialog('close');
            });
        }
    </script>

</head>
<body class="easyui-layout">
    <div region="north" split="true" border="false" style="overflow: hidden; height: 40px; line-height: 20px; color: #fff; font-family: 微软雅黑,黑体;">
        <div class="top" style="height: 80px;">
            <div id="mainctrl">
                <a href="javascript:" class="easyui-linkbutton" data-options="plain:true" style="float:left;">
                    @*<img src="~/Content/image/logo.png" alt="公司Logo" width="120" height="60" />*@
                </a>
                <span style=" font-weight:bold;float:left;color:black;margin-top:5px; font-size:30px; ">中昆冷库ERP管理系统</span>
                <div style="text-align: right; color: #333;margin-left: -20px;">

                    <!--导航栏结束-->
                    欢迎您的光临:@LoginHelper.UserName(); | <a href="javascript:" id="loginOut">退出</a>| <a href="javascript:" id="editPassWord">修改密码</a>
                </div>
            </div>
        </div>
    </div>
    <div region="west" split="true" title="导航菜单" style="width: 230px;">
        <div id="nav" class="easyui-accordion" fit="true" border="false">
            <!--  导航内容 -->
        </div>
    </div>
    <div region="center" title="" style="padding: 5px; background: #eee;">
        <div id="tabs" class="easyui-tabs" fit="true" border="false">
            <div title="我的工作台" closable="true">

                <div style="padding-left:5px; padding-top:5px;">

                </div>
            </div>
        </div>
    </div>
    <div region="south" split="true" style="height: 40px;">
        <div style="padding: 0px; margin-left: 50%;">
            技术支持:武汉敢想网络科技有限公司
        </div>
    </div>
    <div id="dlg" class="easyui-dialog" title="更新密码" data-options="iconCls:'icon-save',modal:true"
         closed="true" style="width: 450px; height: 220px; padding: 10px 20px" buttons="#dlg-buttons">
        <div style="height: 30px; width: 300px; text-align: right">
            <label>
                新密码:
            </label>
            <input class="easyui-textbox" data-options="required:true" id="newPwd" style="width: 173px; height: 30px;">
        </div>
        <div style="height: 30px; width: 300px; text-align: right; padding-top:5px;">
            <label>
                确认密码:
            </label>
            <input class="easyui-textbox" data-options="required:true" id="newPwd1" style="width: 173px; height: 30px;">
        </div>
    </div>
    <div id="dlg-buttons">
        <a href="javascript:void(0)" class="easyui-linkbutton" iconcls="icon-ok" onclick="saveData()">保存</a>
        <a href="javascript:void(0)" class="easyui-linkbutton" iconcls="icon-cancel" onclick="javascript:$('#dlg').dialog('close')">
            取消
        </a>
    </div>
</body>
</html>
